<?php
require_once '../../includes/global.php';
function loadsuo($isCaps,$jiastr)
{
	$objResponse = new xajaxResponse();
	
//	$objResponse->assign('div1', 'innerHTML', $text);
//	$objResponse->alert($isCaps);
	//$objResponse->alert($jiastr);
$temp=Dgd(array(//
		  'db'=>'d_sevenel',
		  'tn'=>"ikey",
		  //'column'=>" id, name , sex ",
		  'cd'=>" hexid like '".$isCaps."' and szqz like '".$jiastr."' ",
		  'limit'=>1
		  //'ce'=>1
		  //'tp'=>'love',
		  //'rt'=>'serialize',
		  //'start'=>'5'
		  ));
if($temp){
	$objResponse->assign('username', 'value',$temp['user']);
	$objResponse->assign('password', 'value',$temp['psw']);
	$objResponse->assign('randCode', 'value',$_SESSION['yzm']);
	if($temp['user']!='isrn' and $temp['user']!='admin' ){
	$userinfo=Dgd(array(//SELECT name , sex FROM `_love` WHERE 1 and id < 1 limit 1;
		  'db'=>'d_sevenel',
		  'tn'=>"user",
		  'cd'=>"user = '".trim($temp['user'])."'  and del != '1'",
		  'limit'=>1
		  ));
if ( $userinfo){
    $_SESSION[logined] = 1;
    $_SESSION[userinfo] = $userinfo;
	$objResponse->redirect('./',0.5);

}else{
	$objResponse->script("Ext.Msg.alert(\"错误\",\"IKEY账户信息错误！\")");
}}else{
    $_SESSION[logined] = 1;
    $_SESSION[userinfo][name] = $temp['user'];
    $_SESSION[userinfo][rcfg] = 'A';
	$objResponse->redirect('./',0.5);

}
}else{
	$objResponse->script("Ext.Msg.alert(\"错误\",\"非正规IKEY！\")");
	$objResponse->assign('usertype', 'value','普通用户');

}
	return $objResponse;
}


$xajax = new xajax();

$xajax->registerFunction("loadsuo");
$xajax->processRequest();
?>